package com.marktrace.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

public class DLocation implements Serializable {
    private Integer id;

    private String eqno;

    private Date uploadtime;

    private String lno;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEqno() {
        return eqno;
    }

    public void setEqno(String eqno) {
        this.eqno = eqno == null ? null : eqno.trim();
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Date getUploadtime() {
        return uploadtime;
    }

    public void setUploadtime(Date uploadtime) {
        this.uploadtime = uploadtime;
    }

    public String getLno() {
        return lno;
    }

    public void setLno(String lno) {
        this.lno = lno == null ? null : lno.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", eqno=").append(eqno);
        sb.append(", uploadtime=").append(uploadtime);
        sb.append(", lno=").append(lno);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DLocation dLocation = (DLocation) o;
        return Objects.equals(lno, dLocation.lno);
    }

    @Override
    public int hashCode() {
        return Objects.hash(lno);
    }
}